package com.xuelang.pipeline.app.resource.converter;

import com.xuelang.pipeline.client.resource.dto.ToolChainDTO;
import com.xuelang.pipeline.domain.resource.ToolChain;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 工具链DTO与工具链实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface ToolChainDTOToToolChainConverter {
    ToolChainDTOToToolChainConverter INSTANCE = Mappers.getMapper(ToolChainDTOToToolChainConverter.class);

    /**
     * ToolChain转化为ToolChainDTO
     * @param toolChain
     * @return
     */
    ToolChainDTO toolChainToToolChainDTO(ToolChain toolChain);

    /**
     * ToolChainDTO转化为ToolChain
     * @param toolChainDTO
     * @return
     */
    ToolChain toolChainDTOToToolChain(ToolChainDTO toolChainDTO);
}
